<template>
	<wsPage title="测试">
		<div slot="page_operate">
			<Button type="ghost"><Icon type="refresh"></Icon><span>刷新</span></Button>
		</div>

        <!-- 当前地址:{{addressVO.address}}<br>
        地址纬度:{{addressVO.lng}}<br>
		地址经度:{{addressVO.lng}}
        <br> -->
       <ws-cropper :imageSrc="editForm.listFileId" cropperId="cropper.id" :dialogTitle="cropper.title" @uploadSuccessEvent="uploadSuccessEvent"></ws-cropper>
		
        <!-- <img :src="'/ws/img/view/'+editForm.listFileId" v-if="editForm.listFileId!=null && editForm.listFileId!=''" style="width:100px;overflow:hidden;"> -->

        <br>
        <!-- <Row>
            <Col span="16">
              <BMap :center="'西安市雁塔区创新大厦'" @clickMapEvent="clickMapEvent"></BMap>
            </Col>
        </Row> -->
        <!-- <Row>
            <Col span="16">
              <ws-selection :labelName="selection.labelName" :placeholder="selection.placeholder" :searchUrl="selection.searchUrl" :columnList="selection.columnList"></ws-selection>
            </Col>
        </Row> -->

	</wsPage>
</template>

<script>
import BMap from '../../components/baiduMap.vue'
    export default {
        data () {
            return {
            	editForm:{
                    listFileId:''
                },
                cropper:{
                    id:'1',
                    title:'截图组件'
                },
                addressVO:{
                    address:'',
                    lat:null,
                    lng:null
                },
                selection:{
                    labelName:'查询条件',
                    placeholder:'提示',
                    searchUrl:'/ws/ops/expresss/searchDemo',
                    columnList:[{
                        title: 'id',
                        key: 'id',
                        align: 'center'
                    },{
                        title: '快递公司',
                        key: 'name',
                        align: 'center'
                    },{
                        title: '快递公司code',
                        key: 'code',
                        align: 'center'
                    },{
                        title: '创建时间',
                        key: 'createDate',
                        align: 'center'
                    },
                    {
                        title: '操作',
                        width: 180,
                        fixed: 'right',
                        align: 'center',
                        render: (h, params) => {
                            return h('div', [
                                h('Button', {
                                    props: {
                                        type: 'text',
                                        size: 'small'
                                    },
                                    on: {
                                        click: () => {
                                            debugger;
                                            let rowId = params.row.id;
                                            this.selectItem(rowId);
                                        }
                                    }
                                }, '选择')
                            ])
                        }
                    }]
                }

            }
        },
        mounted() {
        	// this.init();
        },
        //注册局部组件
        components:{
            BMap
        },
        methods: {
        	
        	query() {
        		
        	},
            //上传成功事件
            uploadSuccessEvent(fileId){
                this.editForm.listFileId = fileId;
            },
            //点击地图事件
            clickMapEvent(obj){
                this.addressVO = obj;
            },
            //选中事件
            selectItem(rowId){
                debugger;
            }
        	
        }
    }	
</script>

<style scoped>
	.tab-demo {
		margin-bottom: 10px;
	}
</style>